home *** CD-ROM | disk | FTP | other *** search
/ Mac Format 1995 June / MacFormat 25.iso / Shareware City / Developers / OutOfPhase1.1 Source / OutOfPhase Folder / SampleStorageDisplay.h < prev    next >
Text File  |  1994-08-11  |  5KB  |  136 lines

  1. /* SampleStorageDisplay.h */
  2.  
  3. #ifndef Included_SampleStorageDisplay_h
  4. #define Included_SampleStorageDisplay_h
  5.  
  6. /* SampleStorageDisplay module depends on */
  7. /* MiscInfo.h */
  8. /* Audit */
  9. /* Debug */
  10. /* Definitions */
  11. /* SampleConsts */
  12. /* FixedPoint */
  13. /* Memory */
  14. /* DataMunging */
  15. /* Scrap */
  16. /* Files */
  17.  
  18. #include "SampleConsts.h"
  19. #include "FixedPoint.h"
  20.  
  21. struct SampleStorageDisplayRec;
  22. typedef struct SampleStorageDisplayRec SampleStorageDisplayRec;
  23.  
  24. /* create a zero-length sample storage object */
  25. SampleStorageDisplayRec*    NewSampleStorageDisplayEmpty(NumBitsType NumBits,
  26.                                                         NumChannelsType NumChannels);
  27.  
  28. /* create a zero-length sample storage object */
  29. SampleStorageDisplayRec*    NewSampleStorageDisplayData(NumBitsType NumBits,
  30.                                                         NumChannelsType NumChannels, largefixedsigned* DataBlock);
  31.  
  32. /* dispose of a sample storage object */
  33. void                                            DisposeSampleStorageDisplay(SampleStorageDisplayRec* Storage);
  34.  
  35. /* get the number of bits being represented in this sample */
  36. NumBitsType                                GetSampleStorageDisplayNumBits(
  37.                                                         SampleStorageDisplayRec* Storage);
  38.  
  39. /* get the number of channels being represented in this sample */
  40. NumChannelsType                        GetSampleStorageDisplayNumChannels(
  41.                                                         SampleStorageDisplayRec* Storage);
  42.  
  43. /* get the number of frames stored in this object */
  44. long                                            GetSampleStorageDisplayNumFrames(
  45.                                                         SampleStorageDisplayRec* Storage);
  46.  
  47. /* get a value from in the array */
  48. largefixedsigned                    GetSampleStorageDisplayValue(SampleStorageDisplayRec* Storage,
  49.                                                         long Index, ChannelType WhichChannel);
  50.  
  51. /* find out if the array has been changed since last being saved */
  52. MyBoolean                                    DoesSampleStorageDisplayNeedToBeSaved(
  53.                                                         SampleStorageDisplayRec* Storage);
  54.  
  55. /* change the number of bits being used to store the data */
  56. void                                            SetSampleStorageDisplayNumBits(
  57.                                                         SampleStorageDisplayRec* Storage, NumBitsType NewNumBits);
  58.  
  59. /* change the number of channels being stored in the array */
  60. MyBoolean                                    SetSampleStorageDisplayNumChannels(
  61.                                                         SampleStorageDisplayRec* Storage,
  62.                                                         NumChannelsType NewNumChannels);
  63.  
  64. /* change the value of one of the sample points */
  65. void                                            SetSampleStorageDisplayValue(SampleStorageDisplayRec* Storage,
  66.                                                         long Index, ChannelType WhichChannel,
  67.                                                         largefixedsigned NewValue);
  68.  
  69. /* indicate that the object has been saved */
  70. void                                            SampleStorageDisplayHasBeenSaved(
  71.                                                         SampleStorageDisplayRec* Storage);
  72.  
  73. /* insert a bunch of zeros into the array */
  74. MyBoolean                                    InsertSampleStorageDisplayArea(
  75.                                                         SampleStorageDisplayRec* Storage, long Index,
  76.                                                         long NumFramesToInsert);
  77.  
  78. /* delete a range of values from the array */
  79. MyBoolean                                    DeleteSampleStorageDisplayArea(
  80.                                                         SampleStorageDisplayRec* Storage, long Index,
  81.                                                         long NumFramesToDelete);
  82.  
  83. /* extract part of the sample & create another sample record containing it */
  84. SampleStorageDisplayRec*    ExtractSampleStorageDisplaySection(
  85.                                                         SampleStorageDisplayRec* Storage, long Index,
  86.                                                         long NumFramesToExtract);
  87.  
  88. /* insert one sample into another at a certain point */
  89. MyBoolean                                    InsertSampleStorageDisplaySection(
  90.                                                         SampleStorageDisplayRec* Storage, long Index,
  91.                                                         SampleStorageDisplayRec* DataToInsert);
  92.  
  93. /* dump the contents of the object and install a copy of the contents of another */
  94. MyBoolean                                    SampleStorageDisplaySetContents(
  95.                                                         SampleStorageDisplayRec* Storage,
  96.                                                         SampleStorageDisplayRec* NewData);
  97.  
  98. /* put the raw data for the sample onto the clipboard */
  99. void                                            PutSampleStorageDisplayOnClipboard(
  100.                                                         SampleStorageDisplayRec* Storage);
  101.  
  102. /* get a sample off the clipboard.  returns NIL if the scrap isn't a sample */
  103. SampleStorageDisplayRec*    GetSampleStorageDisplayFromClipboard(void);
  104.  
  105. /* get a copy of a particular channel of data from the sample */
  106. largefixedsigned*                    SampleStorageDisplayGetChannelFixed(
  107.                                                         SampleStorageDisplayRec* Storage, ChannelType WhichChannel);
  108.  
  109. /* put a new block of data into the sample object.  a copy of the block is made */
  110. MyBoolean                                    SampleStorageDisplayPutMonoFixed(
  111.                                                         SampleStorageDisplayRec* Storage, largefixedsigned* Data);
  112.  
  113. /* put two new blocks of data into a stereo sample object.  copies are made */
  114. MyBoolean                                    SampleStorageDisplayPutStereoFixed(
  115.                                                         SampleStorageDisplayRec* Storage, largefixedsigned* Left,
  116.                                                         largefixedsigned* Right);
  117.  
  118. /* flush any undo information */
  119. void                                            SampleStorageDisplayFlushUndo(SampleStorageDisplayRec* Storage);
  120.  
  121. /* save the object to a temporary file so that we can undo any changes. */
  122. /* if it couldn't be done, then it returns False */
  123. MyBoolean                                    SampleStorageDisplaySetupForUndo(SampleStorageDisplayRec* Storage);
  124.  
  125. /* find out if we can undo something */
  126. MyBoolean                                    SampleStorageDisplayUndoAvailable(SampleStorageDisplayRec* Storage);
  127.  
  128. /* try to undo something.  returns True if the undo data was successfully recovered. */
  129. /* the current state is swapped with the recovered state */
  130. MyBoolean                                    SampleStorageDisplayUndo(SampleStorageDisplayRec* Storage);
  131.  
  132. /* get the actual raw data in the channel */
  133. largefixedsigned*                    SampleStorageDisplayGetActualData(SampleStorageDisplayRec* Storage);
  134.  
  135. #endif
  136.